#include "EnemyManager.h"

EnemyManager* EnemyManager::_instance = 0;

EnemyManager::EnemyManager(BWAPI::Player* enemy) : mEnemy(enemy)
{
}

EnemyManager::~EnemyManager(void)
{
}

void EnemyManager::update()
{
}

bool EnemyManager::hasVisibleUnits()
{
	return !mVisibleUnits.empty();
}

void EnemyManager::unitShowed(BWAPI::Unit* unit)
{
	mVisibleUnits.insert(unit);
}

void EnemyManager::unitDiscovered(BWAPI::Unit *unit)
{
	mUnits.insert(unit);
}

void EnemyManager::unitEvaded(BWAPI::Unit *unit)
{
	mVisibleUnits.erase(std::remove(mVisibleUnits.begin(), mVisibleUnits.end(), unit), mVisibleUnits.end());
}

void EnemyManager::unitDestroyed(BWAPI::Unit *unit)
{
	mUnits.erase(std::remove(mUnits.begin(), mUnits.end(), unit), mUnits.end());
}